package com.xdf.zipperdye.controller;

import com.xdf.zipperdye.service.SysRoleService;
import com.xdf.zipperdye.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/sysRole")
public class SysRoleController {
    @Autowired
    private SysRoleService service;

    @GetMapping("/all")
    public JsonResult getAll(){
        return JsonResult.ok(service.selectAll());
    }
}
